import request from "@/request/api";

//班别方案接口
//1.班别方案查询接口
export function queryClassPlanList(data) {
  return request({
    url: "/eam-service-operation/classes/page",
    method: "get",
    params: data,
  });
}
//1.根据id查询标准详情
export function queryClassPlanDetail(data) {
  return request({
    url: "/eam-service-operation/classes",
    method: "get",
    params: data,
  });
}
//2、班别方案新增或修改接口
export function addOrUpdateClassPlan(data) {
  return request({
    url: "/eam-service-operation/classes",
    method: "post",
    data: data,
  });
}
//3、班别方案删除接口
export function deleteClassPlan(data) {
  return request({
    url: "/eam-service-operation/classes",
    method: "delete",
    params: data,
  });
}

//排班方案接口
//1.排班方案查询接口
export function querySchedulPlanList(data) {
  return request({
    url: "/eam-service-operation/schedule/page",
    method: "get",
    params: data,
  });
}
//1.根据id查询标准详情
export function querySchedulPlanDetail(data) {
  return request({
    url: "/eam-service-operation/schedule",
    method: "get",
    params: data,
  });
}
//2、排班方案新增或修改接口
export function addOrUpdateSchedulPlan(data) {
  return request({
    url: "/eam-service-operation/schedule",
    method: "post",
    data: data,
  });
}
//2、排班方案停用或启用接口
export function stopOrStartSchedulPlan(data) {
  return request({
    url: "/eam-service-operation/schedule/stopOrStart",
    method: "put",
    params: data,
  });
}
//3、排班方案删除接口
export function deleteSchedulPlan(data) {
  return request({
    url: "/eam-service-operation/schedule",
    method: "delete",
    params: data,
  });
}
//4、排班明细导入接口
export function importSchedulPlan(params, data) {
  return request({
    url: "/eam-service-operation/schedule/import",
    method: "post",
    params: params,
    data: data,
  });
}

//5、保存时查询是否有重复排班方案
export function hasDuplicate(data) {
  return request({
    url: "/eam-service-operation/schedule/hasDuplicate",
    method: "post",
    data: data,
  });
}
